<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta charset="UTF-8">
    <title>南小馆（来福士店）</title>
    <link rel="stylesheet" type="text/css" href="../font/./iconfont.css">
    <link rel="stylesheet" href="../css/main.css">
    <link rel="stylesheet" href="../css/shop.css">
    <script src="../lib/iscroll1.js"></script>
    <script src="../lib/jquery.js"></script>
    <script src="../js/main.js"></script>
</head>
<body>
    <div id="wrap-detail">	</div>


	<script src="../lib/template-web.js"></script>

	<script id="tpl-user" type="text/html">
		<div class="shop_header">
        <div class="header_nav">
            <a href=""><</a>
        </div>
        <div class="shopname">
            <div class="logo">
                <img src="../images/nanxiaoguan.jpeg" alt="">
            </div>
            <div class="name">
                <h2>南小馆（来福士店）</h2>
                <p><span class="peisong">蜂鸟专送</span>/<span>36分钟送达</span>/<span>配送费￥5</span></p>
                <p>公告：欢迎观临，用餐高峰期请提前下单，谢谢</p>
            </div>
            <a class="shop_nav" href="#right" id="alowright"> > </a>
        </div>
        <div class="activity">
            <p><i>新</i><span>新用户下单立减17.0元(不与其他活动共享)</span></p>
            <p>2个活动</p>
        </div>
    </div>
    <div class="shop_tab">
        <div class="commodity active">商品</div>
        <div class="evaluate">评价</div>
    </div>
    <div class="shop_list">
        <div class="nav" id="wrapper">
            <ul>
                <li>热销榜</li>
                <li>套餐系列</li>
                <li>南小蝶</li>
                <li>南小炒</li>
                <li>南小汤</li>
                <li>南小炖</li>
                <li>南小面、年糕</li>
                <li>南小饭</li>
                <li>葱油系列</li>
                <li>饮料</li>
            </ul>
        </div>
        <div class="wrap_list">
        <div class="list" id="wrapper2">
            <ul>
                <li class="hot_shale">
                    <h3>热销榜 <span>大家喜欢吃，才叫真好吃</span></h3>
                    <p>...</p>
                </li>
                <li>
                    <div class="food_img">
                        <img src="../images/daxiafan.png" alt="">
                    </div>
                    <div class="foodname">
                        <h3>黄袍滑蛋大虾饭套餐</h3>
                        <p>黄袍滑蛋大虾饭，宇智波鼬专用饭，好吃又开胃，吃了还能开万花筒</p>
                        <p class="xiaoliang"><span>月售202份</span> <span>好评率100%</span></p>
                        <div class="price">
                            <span>￥46</span>
                            <span>+</span>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="food_img">
                        <img src="../images/daxiafan.png" alt="">
                    </div>
                    <div class="foodname">
                        <h3>黄袍滑蛋大虾饭套餐</h3>
                        <p>黄袍滑蛋大虾饭，宇智波鼬专用饭，好吃又开胃，吃了还能开万花筒</p>
                        <p class="xiaoliang"><span>月售202份</span> <span>好评率100%</span></p>
                        <div class="price">
                            <span>￥46</span>
                            <span>+</span>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="food_img">
                        <img src="../images/daxiafan.png" alt="">
                    </div>
                    <div class="foodname">
                        <h3>黄袍滑蛋大虾饭套餐</h3>
                        <p>黄袍滑蛋大虾饭，宇智波鼬专用饭，好吃又开胃，吃了还能开万花筒</p>
                        <p class="xiaoliang"><span>月售202份</span> <span>好评率100%</span></p>
                        <div class="price">
                            <span>￥46</span>
                            <span>+</span>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="food_img">
                        <img src="../images/daxiafan.png" alt="">
                    </div>
                    <div class="foodname">
                        <h3>黄袍滑蛋大虾饭套餐</h3>
                        <p>黄袍滑蛋大虾饭，宇智波鼬专用饭，好吃又开胃，吃了还能开万花筒</p>
                        <p class="xiaoliang"><span>月售202份</span> <span>好评率100%</span></p>
                        <div class="price">
                            <span>￥46</span>
                            <span>+</span>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="food_img">
                        <img src="../images/daxiafan.png" alt="">
                    </div>
                    <div class="foodname">
                        <h3>黄袍滑蛋大虾饭套餐</h3>
                        <p>黄袍滑蛋大虾饭，宇智波鼬专用饭，好吃又开胃，吃了还能开万花筒</p>
                        <p class="xiaoliang"><span>月售202份</span> <span>好评率100%</span></p>
                        <div class="price">
                            <span>￥46</span>
                            <span>+</span>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="food_img">
                        <img src="../images/daxiafan.png" alt="">
                    </div>
                    <div class="foodname">
                        <h3>黄袍滑蛋大虾饭套餐</h3>
                        <p>黄袍滑蛋大虾饭，宇智波鼬专用饭，好吃又开胃，吃了还能开万花筒</p>
                        <p class="xiaoliang"><span>月售202份</span> <span>好评率100%</span></p>
                        <div class="price">
                            <span>￥46</span>
                            <span>+</span>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="food_img">
                        <img src="../images/daxiafan.png" alt="">
                    </div>
                    <div class="foodname">
                        <h3>黄袍滑蛋大虾饭套餐</h3>
                        <p>黄袍滑蛋大虾饭，宇智波鼬专用饭，好吃又开胃，吃了还能开万花筒</p>
                        <p class="xiaoliang"><span>月售202份</span> <span>好评率100%</span></p>
                        <div class="price">
                            <span>￥46</span>
                            <span>+</span>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="food_img">
                        <img src="../images/daxiafan.png" alt="">
                    </div>
                    <div class="foodname">
                        <h3>黄袍滑蛋大虾饭套餐</h3>
                        <p>黄袍滑蛋大虾饭，宇智波鼬专用饭，好吃又开胃，吃了还能开万花筒</p>
                        <p class="xiaoliang"><span>月售202份</span> <span>好评率100%</span></p>
                        <div class="price">
                            <span>￥46</span>
                            <span>+</span>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
        </div>

        <div class="shop_footer">
            <div class="price_peisong">
                <div class="shopcar">
                    <span class="iconfont icon-gouwucheman"></span>
                </div>
                <div class="price">
                    <p>￥0</p>
                    <p>配送费￥5</p>
                </div>
            </div>
            <div class="jiesuan">
                <span>还差￥20起送</span>
            </div>
        </div>
    </div>

    <!--商家详情-->
    <div class="shop_xiangqing">
        <div class="top">
            <a href="#left" id="allowleft"><</a>
            <h1>商家详情</h1>
        </div>
        <div class="shuxing">
            <h2>活动与熟悉</h2>
            <div class="shuoming">
                <p><i>新</i><span>新用户下单立减17.0元(不与其他活动同享)</span></p>
                <p><i>特</i><span>外婆家特价小炒肉</span></p>
                <p><i>特</i><span>想吃外婆家的花菜</span></p>
                <p><i><img src="../images/fapiao.png" alt=""></i><span>该商家支持开发票</span></p>
            </div>
        </div>
        <div class="safety">
            <div class="safe_title">
                <h3>食品监督安全公示</h3>
                <p>企业认证详情 》</p>
            </div>
            <div class="result">
                <div class="xiaolian">
                    <img src="../images/xiaolian.png" alt="">
                </div>
                <div class="result_xiangxi">
                    <p>监督检查结果: <span>良好</span></p>
                    <p>检查日期：2016年03月22日</p>
                </div>
            </div>
        </div>
        <div class="message">
            <div class="massage_title">
                <h3>商家信息</h3>
            </div>
            <div class="xinxi">
                <ul>
                    <li>外婆家（上海大悦城酒店）</li>
                    <li>地址：木叶忍者村宇智波神社</li>
                    <li>营业时间：[00:00-24:00]</li>
                    <li>营业执照 <a href=""> ></a></li>
                    <li>餐饮服务许可证 <a href=""> ></a></li>
                </ul>
            </div>
        </div>
        <div class="null"></div>
    </div>
	</script>

    <script>
    function GetRequest() {  
        var url = location.search; //获取url中"?"符后的字串  
        var theRequest = new Object();  
        if (url.indexOf("?") != -1) {  
            var str = url.substr(1);  
            if(str.indexOf("&")!=-1){
            	var arr=str.split("&");
            	for(var i=0;i<arr.length;i++){
            		var arr2=arr[i].split("=");
            		theRequest[arr2[0]]=arr2[1];
            	}
            }else{
            	var arr2=str.split("=");
            	theRequest[arr2[0]]=arr2[1];
            }
        } 
        return theRequest;  
    } 
    console.log(GetRequest());
    $.get("https://mainsite-restapi.ele.me/shopping/v2/menu",{
    	restaurant_id:GetRequest().id
    },function(res){
    	console.log(res);
    	var xiangqing=template("tpl-user",{"data":res});
    	$("#wrap-detail").append(xiangqing);

    	var myscroll;
        function loaded() {
            setTimeout(function () {
                myscroll = new iScroll("wrapper");
            }, 100);
        }
        window.addEventListener("DOMContentLoaded",loaded,false);
        function loaded2() {
            setTimeout(function () {
                myscroll = new iScroll("wrapper2",{hScroll:false});
            }, 100);
        }
        window.addEventListener("DOMContentLoaded",loaded2,false);
    	
    }) 

    
         
    </script>
</body>
</html>